﻿@model IEnumerable<PortalBusiness.Models.TITULO>

@{
    ViewBag.Title = "Títulos";
}

<h3>Títulos</h3>


<p>
    @Html.ActionLink("Cadastrar novo", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CODIGO_NEGOCIO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CODIGO_LOJA)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DATA_PROCESSAMENTO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.HORA_PROCESSAMENTO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.LOGIN)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_TIPO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_EMISSAO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_VENCIMENTO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_HISTORICO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_VALOR)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_NUMERO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DOC_NATUREZA)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FORNECEDOR)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.STATUS)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.CODIGO_NEGOCIO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CODIGO_LOJA)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DATA_PROCESSAMENTO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.HORA_PROCESSAMENTO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LOGIN)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DOC_TIPO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DOC_EMISSAO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DOC_VENCIMENTO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DOC_HISTORICO)
        </td>
        <td >
            @Html.DisplayFor(modelItem => item.DOC_VALOR)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DOC_NUMERO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DOC_NATUREZA)
            @Html.DisplayFor(modelItem => item.DESCRICAO_NATUREZA)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DESCRICAO_FORNECEDOR)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.STATUS)
        </td>
        <td>
            @if( item.STATUS == 0 )
            {
             @Html.ActionLink("Editar", "Edit", new { id=item.TITULOID })
             @Html.Label(" | ")
             @Html.ActionLink("Excluir", "Delete", new { id=item.TITULOID })
            }
        </td>
    </tr>
}

</table>
